DAGE-88: Bug fix on Embedding Model Evaluator#240
Merged
dantuzi merged 3 commits intodataset-generatorfrom Oct 6, 2025
Merged
Conversation
The problem was the following: the preprocessing was good for reranking_task.py but NOT for retrieval_task.py. Looking at class `AbsTaskRetrieval` it can be spotted that the structure of the string to send to the evaluation process is different. Now we have 2 different function in helper.py, that have been separated for the 2 different tasks. This solves the problem of duplicated embeddings in the cache (can be spotted by using the logger in DEBUG mode -> the documents are pushed 2 times). Another problem came out from logs in DEBUG mode: when I set the reranking task, the cache inside has only the documents that has a score in the candidates.jsonl file. This behaviour makes a lot of sense, since we don't need to have the embeddings of the whole corpus to compute the metrics needed. Since, in the documents_embeddings.jsonl file, we want the embedding of all the docs inside corpus.jsonl file, we still need to remove name and normalize_embeddings, as in Naz PR. The embeddings of the documents which does NOT appear in candidates, are computed by the SentenceTransformer model linked to the cache while the file is being written in the `resource/embeddings/` folder.
984e9dd to
489167b
Compare
nseidan
approved these changes
Oct 6, 2025
489167b to
c99ed37
Compare
c99ed37 to
14a14a6
Compare
dantuzi
approved these changes
Oct 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DAGE-88: Jira ticket
The problem was the following: the preprocessing was good for reranking_task.py but NOT for retrieval_task.py. Looking at class
AbsTaskRetrievalit can be spotted that the structure of the string to send to the evaluation process is different. Now we have 2 different function in helper.py, that have been separated for the 2 different tasks. This solves the problem of duplicated embeddings in the cache (can be spotted by using the logger in DEBUG mode -> the documents are pushed 2 times).Another problem came out from logs in DEBUG mode: when I set the reranking task, the cache inside has only the documents that has a score in the candidates.jsonl file. This behaviour makes a lot of sense, since we don't need to have the embeddings of the whole corpus to compute the metrics needed. Since, in the documents_embeddings.jsonl file, we want the embedding of all the docs inside corpus.jsonl file, we still need to remove name and normalize_embeddings, as in Naz PR. The embeddings of the documents which does NOT appear in candidates, are computed by the SentenceTransformer model linked to the cache while the file is being written in the
resource/embeddings/folder.